package com.ic.shirodemoauth;

import org.apache.shiro.spring.web.config.DefaultShiroFilterChainDefinition;
import org.apache.shiro.spring.web.config.ShiroFilterChainDefinition;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ShiroConfig {
	@Bean
	public Realm authorizer() {
	    return new Realm();
	}
	     
	@Bean
	public ShiroFilterChainDefinition shiroFilterChainDefinition() {
	    DefaultShiroFilterChainDefinition filter
	      = new DefaultShiroFilterChainDefinition();
	 
	    filter.addPathDefinition("/secure", "anon");
	    filter.addPathDefinition("/**", "anon");
	 
	    return filter;
	}
}
